Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Despooling Messages


GXCountPages

QuickDraw GX sends the GXCountPages message to determine how many pages are in the file that is about to be despooled. You can override the GXCountPages message to change the logical number of pages in the spool file. Your override of the GXCountPages message must match the following formal declaration:

OSErr MyCountPages (gxSpoolFile aSpoolFile, long *numPages);
aSpoolFile
The spool file.
numPages
On return, the number of pages in the spool file.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX, in its default implementation of the GXImageDocument message, sends the GXCountPages message to determine the number of pages in the spool file prior to despooling.

You override this message if you need to change the logical number of pages in the spool file (for example, if you are producing thumbnail sketches of the document page with several to a printed page).

The default implementation of this message counts and returns the number of pages in the spool file. If you need to alter the page count returned by this message, you need to first forward the message and then add your own code, as you would in the case of the thumbnail example.

SPECIAL CONSIDERATIONS
You rarely send the GXCountPages message yourself.

You must forward the GXCountPages message because QuickDraw GX depends on receiving it to know how many pages to despool. You need to first forward this message and then change the value, if necessary.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
gxIncompletePrintFileErrThe spool file is not complete.
gxCrashedPrintFileErrThe spool file could not be opened.
gxInvalidPrintFileVersionThe version number of the spool file is not valid.
SEE ALSO
The GXImageDocument message is described on page 4-93.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help